package com.xiaozhi.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;

/**
 * <p>
 *
 * </p>
 *
 * @author 烟尘
 * @since 2023-03-15
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("reply")
public class Reply implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 回复id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 回复人id
     */
    @TableField("responder_id")
    private Integer responderId;

    /**
     * 回复内容
     */
    @TableField("content")
    private String content;

    /**
     * 时间
     */
    @TableField("time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime time;

    /**
     * 点赞数
     */
    @TableField("like_nums")
    private Integer likeNums;

    /**
     * 讨论id
     */
    @TableField("discussion_id")
    private Integer discussionId;

    @TableField(exist = false)
    private Student student;

}
